A PLC includes a plurality of units, such as, for example, a CPU (Central Processing Unit) and an I/O (Input/Output) unit, the CPU including a microprocessor that executes user programs, the I/O unit inputting signals from an external switch or sensor and outputting signals to an external relay or actuator. The PLC exchanges data among the units through a PLC system bus and/or a field network in each user program execution cycle and executes control operations.
In operation control of a machine or facility, motion control is sometimes included to control motion of a motor. Such motion control, specifically, control processing to periodically output an instruction value to a motor driver that drives a motor (execution of a motion calculation program) is conventionally performed on a motion controller provided separately from the PLC. In a field of information technology, meanwhile, speed of a microprocessor and communication network have been increasing. The technology in such a field has also become available in the PLC for execution of not only a user program but also a motion calculation program in one microprocessor.
For example, Patent Literature 1 (Japanese Patent Laid-Open Publication No. 2007-140655) discloses a configuration in which one CPU processes a motion control function that controls a motor and a PLC function that executes sequence calculation (user program). More specifically, Patent Literature 1 discloses that “periodic motion control processing and respective axis processing” and “high-speed sequence processing” are executed in each base clock cycle, and “low-speed sequence processing” or “non-periodic motion control processing” is executed during a remaining time in each base clock cycle.